/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package modele;

import java.util.Collection;
import java.util.TreeSet;

/**
 *
 * @author sio
 */
public class Spe implements Comparable<Spe>{
    private String nom;
    private Collection<Med> lesMeds=new TreeSet<Med>();
    
    public Spe(String n){
        this.nom=n;
        
    }
    
    public String getNom() {
        return this.nom;
    }
    
    public Collection<Med> getLesmeds(){
        return this.lesMeds;
    }
    
    public void addMed(Med unMed){
        lesMeds.add(unMed);
    }

    @Override
    public int compareTo(Spe o) {
        //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        return nom.compareTo(o.nom);
    }
    
}
